package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 工单表
 *
 * @author zhiyuan
 * @since 2023-02-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_work_order")
@Schema(name = "EduWorkOrder", title = "工单表", description = "工单表实体类")
public class EduWorkOrder extends Model<EduWorkOrder> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "workOrderId", title = "主键")
    @TableId(value = "work_order_id", type = IdType.ASSIGN_ID)
    private Long workOrderId;

    @Schema(name = "workNum", title = "工单序号")
    @TableField(value = "work_num")
    private Integer workNum;

    @Schema(name = "workTitle", title = "标题")
    @TableField(value = "work_title")
    private String workTitle;

    @Schema(name = "workOrderType", title = "工单类型")
    @TableField(value = "work_order_type")
    private String workOrderType;

    @Schema(name = "workQuestion", title = "工单问题描述")
    @TableField(value = "work_question")
    private String workQuestion;

    @Schema(name = "fileInfo", title = "图片材料")
    @TableField(value = "file_info")
    private String fileInfo;

    @Schema(name = "fileMaterial", title = "文件材料")
    @TableField(value = "file_material")
    private String fileMaterial;

    @Schema(name = "workId", title = "所属数据id")
    @TableField(value = "work_id")
    private String workId;

    @Schema(name = "submitterId", title = "提交人user_id")
    @TableField(value = "submitter_id")
    private String submitterId;

    @Schema(name = "submitterName", title = "提交人姓名")
    @TableField(value = "submitter_name")
    private String submitterName;

    @Schema(name = "submitterCellphone", title = "提交人联系方式")
    @TableField(value = "submitter_cellphone")
    private String submitterCellphone;

    @Schema(name = "submitterOrgId", title = "提交人所属组织")
    @TableField(value = "submitter_org_id")
    private String submitterOrgId;

    @Schema(name = "fullName", title = "学生姓名")
    @TableField(value = "full_name")
    private String fullName;

    @Schema(name = "idcard", title = "学生证件号码")
    @TableField(value = "idcard")
    private String idcard;

    @Schema(name = "workHandleStatus", title = "处理状态：0待处理 1处理中 2已处理")
    @TableField(value = "work_handle_status")
    private String workHandleStatus;


    @Schema(name = "workStatus", title = "工单状态：0 基教科待审核 1科长待审核 2技术人员待处理 3处理中 4 处理完成")
    @TableField(value = "work_status")
    private String workStatus;


    @Schema(name = "handleUserId", title = "处理人user_id")
    @TableField(value = "handle_user_id")
    private String handleUserId;

    @Schema(name = "handleOrgId", title = "处理组织org_id")
    @TableField(value = "handle_org_id")
    private String handleOrgId;

    @Schema(name = "handleTime", title = "处理时间")
    @TableField(value = "handle_time")
    private Date handleTime;

    @Schema(name = "handleStatus", title = "处理意见1完成，2不予处理")
    @TableField(value = "handle_status")
    private String handleStatus;

    @Schema(name = "handleMessage", title = "处理描述")
    @TableField(value = "handle_message")
    private String handleMessage;

    @Schema(name = "createName", title = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", title = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", title = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", title = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "del", title = "0,未删除,1,已删除")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Schema(name = "finishFlag", title = "是否最终处理节点")
    @TableField(value = "finish_flag")
    private String finishFlag;

    @Schema(name = "handleMaterial", title = "处理信息上传附件")
    @TableField(value = "handle_material")
    private String handleMaterial;

    @Schema(name = "areaCode", title = "行政区划")
    @TableField(value = "area_code")
    private String areaCode;

    @Schema(name = "returnVisits", title = "是否回访,1是0否")
    @TableField(value = "return_visits")
    private String returnVisits;

    @Schema(name = "returnTelephone", title = "回访电话")
    @TableField(value = "return_telephone")
    private String returnTelephone;

    @Schema(name = "submittedTo", title = "提交给谁（1基教科审核 2科长复审 3技术人员处理)")
    @TableField(value = "submitted_to")
    private String submittedTo;

    @Schema(name = "onsiteSubmission", title = "是否现场，1是0否")
    @TableField(value = "onsite_submission")
    private String onsiteSubmission;

    @Schema(name = "workDate", title = "工单提交日期")
    @TableField(value = "work_date")
    private Date workDate;
    @Override
    public Serializable pkVal() {
        return this.workOrderId;
    }
}
